package com.heima.wemedia.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dto.WmMaterialDto;
import com.heima.model.wemedia.pojo.WmMaterial;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * Created by ZYJ on 2021/5/26 20:43
 */

public interface MaterialService extends IService<WmMaterial>{

    /**
     * 文件上传
     * @param multipartFile
     * @return
     */
    ResponseResult uploadPicture(MultipartFile multipartFile);

    /**
     * 列表
     * @param dto
     * @return
     */
    ResponseResult findList(WmMaterialDto dto);

    /**
     * 删除素材
     * @param id
     * @return
     */
    ResponseResult deleteMaterial(Integer id);

    /**
     * 收藏与取消收藏素材
     * @param id
     * @return
     */
    ResponseResult collectionMaterial(Integer id,Short type);
}
